Terraform: Up and Running: Writing Infrastructure as Code by Brikman Yevgeniy

Terraform: Up and Running: Writing Infrastructure as Code by Brikman Yevgeniy

Author:Brikman, Yevgeniy [Brikman, Yevgeniy]
Language: eng
Format: azw3
Publisher: O'Reilly Media
Published: 2017-03-13T04:00:00+00:00


def example_function(param1, param2) return "Hello, #{param1} #{param2}" end # Other places in your code return_value = example_function("foo", "bar")

In Terraform, a module can also return values. Again, this is done using a mechanism you already know: output variables. You can add the ASG name as an output variable in /modules/services/webserver-cluster/outputs.tf as follows:

output "asg_name" { value = "${aws_autoscaling_group.example.name}" }

You can access module output variables the same way as resource output attributes. The syntax is:



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.